/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.miracleteam.miracle.services.servicesImpl;

import com.miracleteam.miracle.dao.MatHangCuaGianHangDAO;
import com.miracleteam.miracle.dao.daoImpl.MatHangCuaGianHangDAOImpl;
import com.miracleteam.miracle.entities.Mathangcuagianhang;

import com.miracleteam.miracle.services.MatHangCuaGianHangService;
import java.util.List;

/**
 *
 * @author DangKhoa
 */
public class MatHangCuaGianHangServiceImpl implements MatHangCuaGianHangService {

    public List LayDSXemNhieuNhat(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayDSXemNhieuNhat(maGH);
    }

    public List LayDSMoiNhat(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayDSMoiNhat(maGH);
    }

    public List LayDSKhuyenMai(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayDSKhuyenMai(maGH);
    }

    public List LayDanhMucSanPham(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayDanhMucSanPham(maGH);
    }

    public List TimKiem(String maGH, String key, double giatu, double giaden) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.TimKiem(maGH, key, giatu, giaden);
    }

    public int SoSanPham(String maGH, String key, double giatu, double giaden) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.SoSanPham(maGH, key, giatu, giaden);
    }

    public int DemSoTrang(String maGH, String key, double giatu, double giaden) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.DemSoTrang(maGH, key, giatu, giaden);
    }

    public List TimKiemPT(String maGH, String key, double giatu, double giaden, int trang) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.TimKiemPT(maGH, key, giatu, giaden, trang);
    }

    public int TongSanPhamCuaGianHang(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.TongSanPhamCuaGianHang(maGH);
    }

    public int DemSoTrangChoTatCaSanPham(String maGH) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.DemSoTrangChoTatCaSanPham(maGH);
    }

    public List LayDanhMucSanPhamPT(String maGH, int trang) {
        MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayDanhMucSanPhamPT(maGH, trang);
    }
     public Mathangcuagianhang LayMatHang(String ma)
     {
         MatHangCuaGianHangDAO mhDao = new MatHangCuaGianHangDAOImpl();
        return mhDao.LayMatHang(ma);
     }
     public List MatHangLienQuan(String maGH,String ten)
     {
         MatHangCuaGianHangDAO mhDao=new MatHangCuaGianHangDAOImpl();
         return mhDao.MatHangLienQuan(maGH, ten);
     }
             
      public List TimKiemPT_LoaiSP(String maGH, String tenLoaiSP, int trang)
      {
       MatHangCuaGianHangDAO mhDao=new MatHangCuaGianHangDAOImpl();
       return mhDao.TimKiemPT_LoaiSP(maGH, tenLoaiSP, trang);
      }
   
     public int SoSanPham_LoaiSP(String maGH, String tenLoaiSP){
          MatHangCuaGianHangDAO mhDao=new MatHangCuaGianHangDAOImpl();
          return mhDao.SoSanPham_LoaiSP(maGH, tenLoaiSP);
     }
    public int DemSoTrang_LoaiISP(String maGH, String tenLoaiSP) {
         MatHangCuaGianHangDAO mhDao=new MatHangCuaGianHangDAOImpl();
         return mhDao.DemSoTrang_LoaiISP(maGH, tenLoaiSP);
    }
}
